import java.util.ArrayList;

public class Mapper {

	private int _generation;
	private ArrayList<Robot> _robots;

	public Mapper(int generation, ArrayList<Robot> robots) {
		set_generation(generation);
		set_robots(robots);
	}

	public void set_generation(int _generation) {
		this._generation = _generation;
	}

	public int get_generation() {
		return _generation;
	}

	public void set_robots(ArrayList<Robot> _robots) {
		this._robots = _robots;
	}

	public ArrayList<Robot> get_robots() {
		return _robots;
	}

	public void robotsToSmall() {
		String directoryName = Main.PATH + "bots_" + get_generation() + "\\";
		String fileName;
		for (int i = 0; i < get_robots().size(); i++) {
			// Crear archivo
			fileName = "bot_" + get_robots().get(i).get_id() + ".sma";
			FileManager.CreateDirectory(directoryName);
			FileManager.CreateFile(directoryName + fileName, get_robots()
					.get(i).robotToSmall());
		}
	}
}
